package com.foreknow.demo4;

public class K {
    public void m1(X x){
        x.init();
    }

    public X m2(){
        return new Y();
    }

    public static void main(String[] args) {
        K k = new K();
        X x = new Y();
        k.m1(x);

        x = new Z();
        k.m1(x);
    }
}
